Texture mapping is a core technology of current 3D graphics systems. Such graphics systems are used for graphics applications like 3D computer games for personal computers or gaming consoles, such as the Nintendo Game Cube, the Sony Playstation and the Microsoft Xbox. With texture mapping, the geometry of a 2D representation of 3D objects is provided with texture. As a result the shape as well as the colors of the on-screen graphics realistically resemble the 3D objects. Two techniques are often used for texture mapping, inverse texture mapping (ITM) and forward texture mapping (FTM). With ITM the pixels are traversed in screen space and a mapper maps the pixel grid coordinates to texel coordinates. The intensity of the mapped texel coordinate is determined by weighting texel intensities stored in a texture memory and occurring at texel grid positions surrounding a texel coordinate. With FTM screen space positions are calculated from the texture grid coordinates. The intensities at the screen space positions are distributed over surrounding screen space grid positions and the distributed intensities at the screen space grid positions are stored in an image buffer. The graphics pipeline according to the invention is based on the FTM technique.
A typical 3D FTM graphics pipeline comprises an input for receiving texture data and graphics data, a texture memory to store the texture data, a rasterizer to rasterize input polygons in texture space and a mapper to map the texture onto the screen. The texture data defines texture maps, each texture map comprises an array of texels, each texel being associated with texture space grid coordinates and a texture color. The vertex data comprises texture space input coordinates that define the vertices of input polygons and screen space input coordinates that define the vertices of output polygons. The output polygons constitute a geometry of a 2D representation of 3D objects. Each input polygon is associated with a corresponding output polygon. The 2D representation is used to be displayed on a display screen and represents a perspective view on the 3D objects from a certain viewpoint. The texture memory stores the texture data. A rasterizer receives the texture space input coordinates of the input polygons and provides the texture space grid coordinates of the texels inside the input polygons. The texture space input coordinates that are the vertices of the input polygons need not be positioned on grid positions. A mapper maps the texel colors and coordinates onto the output polygons. The mapping is performed by calculating screen space output coordinates from the texture space grid coordinates. The screen space output coordinates are generally not on pixel grid positions in the screen space. Often a screen space resampler is used for splatting a color of the mapped texture space grid coordinate over the pixel grid positions surrounding the screen space output coordinates.
Known FTM graphics systems use perspective mapping for mapping polygons in texture space to polygons in screen space. An example of a perspective mapping is shown in FIG. 1. In screen space 5 a perspective projection of a pyramid is shown. In the real world the pyramid is formed by four triangles on a square base, of which only three triangles can be seen from the viewpoint defining the 2D representation in screen space 5. The texture space 4 comprises the texture of the three triangles 1, 2 and 3 visible in the screen space representation. The triangles 1, 2 and 3 in the 2D texture space 4 are equal to the triangles in the 3D world space (not shown) as seen from a viewing direction normal to the triangles. Each triangle in texture space 4 undergoes a different transformation, depending on its orientation in world space relative to the viewing plane (=screen space 5). In this event, the shape of one triangle 2, in world space is parallel to the viewing plane 5, and the shape of the texture of this triangle 2 is preserved in the 2D representation. The perspective projection of the pyramid onto the screen space 5 results in transformation of two triangles 1 and 3 into differently shaped triangles. The texture on these two triangles 1 and 3 is also transformed, because all texels inside the triangles 1 and 3 are transformed together with the triangles 1 and 3 itself. The result of the perspective projection shown in FIG. 1 is that the polygons in texture space are transformed to a 2D representation of the same triangles, as seen from a viewing direction, not being normal to the viewing plane 5.
The general form of the perspective mapping used in 3D graphics is:
                              (                                                                      x                  c                  h                                                                                                      y                  c                  h                                                                                                      w                  c                  h                                                              )                =                              (                                                            A                                                  B                                                  C                                                                              D                                                  E                                                  F                                                                              G                                                  H                                                  I                                                      )                    ⁢                      (                                                                                u                    g                                                                                                                    v                    g                                                                                                1                                                      )                                              (        1        )            where the h indicates that these are homogeneous coordinates which still have to undergo division by the third coordinate (wch) to arrive at the actual screen space-output coordinates xc and yc. ug and vg are the texture space grid coordinates of the texels to be mapped. Homogeneous coordinates are used to split the non-linear perspective projections into easy-to-implement linear operations and one division. The mapper first calculates the mapping coefficients A-I, using the texture space input coordinates of input polygons and screen space input coordinates of output polygons. Because all polygons in world space have a different orientation relative to the viewing plane 5, the mapping coefficients are different for different polygons. When the mapping coefficients are known, all texels inside the polygon are mapped onto the output polygons.
A drawback of the graphics system described above is the complexness and the expensiveness of the rasterizer. The input polygons may, for example, be triangles, quadrilaterals or pentagons, defined by the texture space coordinates of its vertices. For determining which texels are inside the polygon, the rasterizer first has to determine the edges of the polygon. Then it can be determined which texels are inside the polygon and are to be further processed. For the edge calculation a complex and expensive rasterizer is required. As a consequence, such a rasterizer is not suitable for low budget graphics systems. Such low budget systems are desired for adding 3D graphics technology to, for example, televisions and cellular phones.